package com.gitee.huanminabc.fastboot.web.servlet;

import com.gitee.huanminabc.nullchain.common.NullResult;
import lombok.extern.slf4j.Slf4j;

/**
 * @description:
 * @author: huanmin
 * @create: 2025-04-01 18:08
 **/
@Slf4j
public class ThrowableEventHandle implements InterfaceExceptionEvent {

    @Override
    public Class<? extends Throwable> interceptException() {
        return Throwable.class;
    }

    @Override
    public NullResult<?> exceptionHandler(Throwable throwable) {
        return NullResult.error(throwable.getMessage());
    }
}
